home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr48
/
pasclern.zip
/
BININ.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-04-01
|
600b
|
26 lines
PROGRAM binary_input;
TYPE input_record = RECORD
number : INTEGER;
amount : REAL;
name : STRING[30];
END;
VAR input_file : FILE of input_record;
bird_food : ARRAY[1..20] OF input_record;
index : BYTE;
BEGIN (* main program *)
ASSIGN(input_file,'KIBBLES.BIT');
RESET(input_file);
FOR index := 1 TO 20 DO
IF NOT EOF(input_file) THEN
READ(input_file,bird_food[index]);
CLOSE(input_file);
WRITELN(bird_food[6].number:6,bird_food[20].amount:13:5,
' ',bird_food[1].name);
END. (* of main program *)